Sort Data Table Multi Cols
AutomatR.DefaultActivities.Datatable.SortDataTableMultiCols
The "Sort Data Table Multi Cols" activity in AutomatR facilitates sorting an entire DataTable based on ascending or descending order, considering the values of one or more specified columns. This activity is beneficial for organizing data in a structured manner, enhancing the efficiency of subsequent workflow processes.
Properties
Name | Description |
---|---|
Input | |
Data Table | Enter the DataTable variable on which sorting needs to be performed. DataTable variable or argument. |
Sort Expression | Click the "Set Sort" button to invoke a wizard that prefills the sort expression based on the selected columns. String variable or argument. |
Misc | |
Display Name | Provides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variable or argument containing the desired display name. |
Optional | |
Delay | Specifies the amount of time (in seconds) to wait before executing the "Sort Data Table Multi Cols" activity. This can be useful for handling synchronization issues. Integer variable or argument containing the delay duration. Example: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1. |
Output | |
Result | Stores the sorted DataTable extracted from the activity. DataTable variable or argument. |
How to use:
- Drag and drop the "Sort Data Table Multi Cols" activity onto the workflow.
- Configure the properties by specifying the DataTable variable on which sorting is to be performed and the sort expression using the "Set Sort" button.
- Optionally, configure the delay and customize the display name.
- Execute the workflow to obtain the sorted DataTable based on the specified columns.
Example: Consider an example where the "Sort Data Table Multi Cols" activity is used to sort a DataTable named "employeeData" based on the columns "Salary" in ascending order and "EmployeeName" in descending order:
Sort Data Table Multi Cols:
Display Name: "Sort Employee Data"
Data Table: employeeData
Sort Expression: "Salary ASC, EmployeeName DESC"
Result: sortedEmployeeData
In this example, the activity sorts the "employeeData" DataTable based on the specified columns, and the result is stored in the "sortedEmployeeData" DataTable variable for further use in the workflow.